package com.netx.cubigraf.servlets;
import java.io.IOException;
import com.netx.ebs.AuthenticatedServlet;
import com.netx.ebs.EbsRequest;
import com.netx.ebs.EbsResponse;
import com.netx.ebs.TemplateValues;
import com.netx.data.Database;


public class SrvAdminCheckPool extends AuthenticatedServlet {

	protected void doGet(EbsRequest request, EbsResponse response) throws IOException {
		Database db = getEbsContext().getDatabase();
		TemplateValues tv = new TemplateValues();
		tv.put("num_active", db.getNumActiveConnections());
		tv.put("num_idle", db.getNumIdleConnections());
		response.sendTemplate("admin.check-pool.tplt", tv);
	}

}
